use stencil_util::IdentError;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum YaError {
    #[error("unknown type '{0}'")]
    UnknownType(String),

    #[error("duplicate type name '{0}'")]
    DuplicateTypeName(String),

    #[error("duplicate field name '{0}'")]
    DuplicateFieldName(String),

    #[error("ident: {0}")]
    InvalidIdentifier(#[from] IdentError),
}
